using System;

namespace SharpMud.Server.Systems
{
	public interface IServerSystem
	{
		/// <summary>
		/// Initialize a server system from an UnInitialized state
		/// </summary>
		/// <param name="host">The host of the server system</param>
		void Initialize(IServerSystemHost host);
		/// <summary>
		/// Stats the server system from an Initialized or a Stopped state
		/// </summary>
		void Start();
		/// <summary>
		/// Pauses the server system from a Running state
		/// </summary>
		void Pause();
		/// <summary>
		/// Resumes the server system from a Paused state
		/// </summary>
		void Resume();
		/// <summary>
		/// Stops the server system from a Running or a Paused state
		/// </summary>
		void Stop();
		/// <summary>
		/// Disposes of the server system from a Stopped state
		/// </summary>
		void Dispose();
		
		/// <summary>
		/// The current status of the server system
		/// </summary>
		ServerSystemStatus							Status {get;}
		/// <summary>
		/// The event raised after the server system's status changes
		/// </summary>
		event EventHandler<ServerSystemStatusChangeEventArgs>	StatusChanged;

		/// <summary>
		/// Gets the IServerSystemHost of this this IServerSystem
		/// </summary>
		IServerSystemHost   Host {get;}
	}
}